There are two main varieties of 1942 pennies: the "copper" penny and the "steel" penny. Copper pennies were minted early in the year, before the United States switched to steel for penny production in order to conserve copper for the war effort. Steel pennies are more common than copper pennies, and are worth slightly less.
The condition of a penny is also important in determining its value. Pennies that are circulated and show signs of wear are worth less than uncirculated pennies that are in mint condition.
If you have a 1942 penny, you can determine its value by looking at its condition and variety. You can also check online coin price guides to see what similar pennies are selling for.