I've been a freelancer for the better part of 15 years. I completely agree that many freelancers undervalue themselves.
What most people fail to realize is that freelancers don't carry the same amount of expenses to an employer that an employee does- typically a freelancer (depending on industry of course) they'll carry their own insurance and be exempt from the expenses that employers typically have to pay for their employees- like workers compensation insurance.
This alone means that a freelancer should be charging rates above what an employee would make.
Marketing is hugely important, and as a freelancer, you have to be able to provide value past what an employer would get from hiring someone full time. It's up to you to determine what that is that sets you apart, and then bank on that to secure yourself contracts with potential clients.