How Do I Pollinate My Plants by Hand?
Tomatoes are self-pollinating but squash, zucchini, pumpkins and other vine crops, produce separate male and female flowers on the same plant and may need assistance in order to produce a crop in times of stress or the absence of insect vectors. It can be a bit time consuming but one can hand-pollinate by using a small artist's paintbrush and touching it to the pollen-bearing stamens in the male flowers and then to the receptive tip of the pistil in the female flower (the one that appears to have a small squash or such at the base).
First, make sure that your plant is producing both male and female flowers before assuming that bees or other insects are not doing their job. Usually, the first flowers are all males and so will fall off without producing fruit. Extreme hot or cold weather can also the production of only male flowers or render pollen ineffective.
If there are both types of flower but the tiny fruit appear to be rotting or dying on the vine, this is a sign of inadequate pollination (also called "fruit abortion"). In addition to the brush method mentioned above, one can simply pick a male bloom, peel off all the flower petals and lightly dust pollen onto the pistils of the females with the male stamen. Several females can be pollinated with one male. It is easiest to do early in the morning when the blooms are open.