Some of the time you spend with a client can be considered a cost of doing business. For example, initial sales calls, pleasantries, quick chats, contract signing etc. Others are chargeable events that you can't really soak up, certainly not in the long term - i.e. on-site visits, lengthy phone calls or emails providing 'consulting' on matters relating to the project or their business. Often though it's not necessarily about the money, it's often just incredibly inconvenient and inefficient for you to be continuously having to deal with someone pestering you - for example the clients who phone or email several times a day.
You set the rules on these things. Specify how consulting works with you - let them know the procedure they must follow if they want you to consult with them on a matter. Encourage them to book an appointment, even for phone calls. Don't answer emails immediately, make them wait 24 hours for a detailed response (you can always initially send a quick "Very busy, will reply in detail later" email). If they appear to be taking advantage, don't be afraid to tell them and offer to arrange a consultation at your hourly rate. In your contract, define what type of communications will be charged for and the relevant hourly rate.
If you quote a fixed price for a project, allow for this in the final price you quote - e.g. you could assume you'll spend 5 hours engaging with the client over the course of the project, so make sure your quoted price allows for that.
If you charge hourly for a project, this shouldn't be a problem as long as you made it clear upfront that clients would be charged for lengthy consulting, even via email.
My accountant doesn't charge me if I ask a quick question via email once in a while. But if my question requires a lengthy response, he'll email me back to let me know it's chargeable. TBH though, you are not an accountant, so your milage may vary on this, it's really about developing a gut feeling over how to handle it and it will vary from client to client. You definitely don't want to penny pinch with a good client, it's not worth it, especially if they already put lots of business your way. Learn when to suck it up as a cost of doing business.