Hermit crabs are happiest kept at 72-80 F (22-27 C). If the temperature drops below 72 F on a regular basis, the crabs will likely become weak, stressed and ill. Unless living in a tropical climate, most owners will need to use a heater at least part of the time to keep the crab tank at optimal temperatures. Undertank heaters, lights, or a combination of both can be used to maintain appropriate temperatures.
Undertank heaters (UTH) can be placed under one end of the tank in order to provide a warm side and a cooler side. These will generally raise the temperature a few degrees above room temperature. For ideal temperature control these can be combined with a thermostat to maintain a given temperature, or you can put them on a timer to come on and off to maintain temperatures. Invest in a good thermometer for inside the tank, and monitor the temperature near the substrate. If the heater isn't heating the tank up enough, try removing some of the substrate over the heater - the thinner substrate will increase the heat in the tank. If the tank is getting too warm, you can increase the depth of the substrate. Some experimentation may be necessary to get good, stable temperatures. Make sure that there is a temperature gradient in the tank, so the crabs have a choice of what temperature they want to be at.
Lights of various types (see below) can also provide heat for the tank; some experimentation with lighting may also be necessary to find the combination of lights and UTH that works best for your tank.
In the past, it was though that hermit crabs were nocturnal and providing lights could be stressful for the crabs. However, low wattage and/or special night light bulbs are a good option and many crab owners have found their crabs became more active with lighting and even bask near the lights when lighting was added to the tank. Be sure to provide a light-dark cycle (12 hours light and 12 hours dark seems to work well). This means day glow or fluorescent bulbs should only off at night (at night, special night time bulbs can be used if desired). Using a desk lamps to heat the tank, or high wattage reptile bulbs, may overheat the tank and be too drying so these are not recommended.
The easiest way to add lighting is to use a reptile heating/lighting hood over the tank. Hoods can be found with two ceramic receptacles for incandescent bulbs; a day glow bulb can be put in one side, and a night glow bulb in the other. It is best to start with 15 watt bulbs, and go to higher wattages only if necessary, especially with a 10 gallon tank. If necessary, wood slats can be used to raise the hood a bit above the glass (if the glass gets too hot). Some hoods have a third receptacle for a fluorescent bulb, and some owners have reported good results with a Reptisun 2.0 fluorescent. Reptile heat hoods are best used on glass top tanks (or screen, but screen tops make humidity regulation difficult) as the lights will be quite warm and could melt plastic.
A combination of lighting and undertank heat can be used to heat the tank.
Along with the proper temperature, adequate humidity in the tank is vitally important to hermit crabs. Since crabs "breathe" via gills, the proper exchange of oxygen by the crabs depends on the humidity in the air, so if the tank air is too dry the crabs will essentially suffocate. They need a relative humidity of around 70-80% and since this is so important to the crabs it is worth investing in a humidity meter (hygrometer) so you can make sure the crabs will be okay. You should be able to find one in the reptile section of the pet store. Excess humidity is not desirable either as it will cause condensation as well as encouraging the growth of bacteria and fungus in the tank.
The water dish you provide in the tank will likely be sufficient for creating the proper humidity, as long as the tank is enclosed (solid sides and top). If you need to increase the humidity level, try a fairly large chunk of natural sea sponge in a dish of water (remember to always use dechlorinated water). The sponge can hold lots of water and has lots of surface are for evaporation to boost the humidity. Have a couple of sponges on hand so you can swap and clean them frequently (soak them in very hot dechorinated water or a sea salt/water mix, then allow them to dry completely as they are a good medium for bacterial growth). If a mesh or vented lid is making humidity control difficult, the lid can be modified by covering most of the top with plastic wrap or clear packing tape.