There are times commercial pilot see their family a lot and times they are away from their families because they work a lot. It all depends on a variety of factors.
First of all, there are all kinds of commercial pilots. The term "commercial pilot" simply means a pilot that can be paid to fly because she/he has earned a commercial pilots license. There are all kinds of commercial pilot jobs and aircraft. For example, commercial pilot jobs would include: flight instructor, towing banners, fire fighting, pipeline patrol, agricultural as in crop dusting, search and rescue, float planes, cargo, helicopters, charter, corporate aircraft and airlines to name a few.
Being with a major US airline for over 35 years, there are times I work every weekend and every holiday and other times when I have been at home for months at a time. Airline pilots can fly a "schedule" or fly "reserve". A pilot flying a schedule will typically know what trips she/he will be flying weeks in advance of flying the trip. The schedule can be working 10 days/month or 20 days/month. Airlines keep a staff of reserve pilots that are called out in the event another pilot calls out sick, a flight is delayed or diverts to another airport due to weather or a mechanical issue. These spare pilots have to be available to be called out if needed and can be at home waiting for the call out.
Pilots can fly everything from short distance flights with smaller regional aircraft to large jumbo jets flying long distances. Airline pilots can be home every night or could be away from their families for weeks at a time. It depends of the company they work for or the aircraft or routes they fly.
Most quality of life issues that affect how much time a pilot can spent with his family is determined by a seniority based system. The longer you are with an airline, the better schedule you can get and the more time you can spend with your family.