If you had a good relationship with your former boss, it's not unreasonable to ask.
Hi [boss],
Hope you're doing well. [some other pleasantries] I recently got a job offer from another company, but with a fairly low salary (around $x). I was wondering if you could give me an idea of what the current market salary is for someone with my skills?
Thanks,
Guillaume
Also consider before you write whether you're open to a job offer from your former company or not; I wouldn't ask for one in this letter, but it's possible your former boss will come back to you with one.