If cost is more of a factor in your diet, then we would suggest focussing on foods that provide a lot of nutritional value and aren't as expensive. It will heavily depend on what foods you like though, and your location and where you do your shopping.
Generally, though, foods that are nutrient-dense and relatively inexpensive include things like eggs, milk, dried beans/lentils, dry pasta and rice, oats, chicken, nuts/seeds, peanut butter, etc. Produce can be variable, as fruits and veggies are always changing in price. Look for what is in season, and also check prices on canned/frozen fruits and vegetables.
For the most part, try to go for fresh foods that you prepare yourself. Not only are they usually a better option for your health, but also less expensive since they require more time to prepare. Also, buying in bulk can be a good option. A lot of times if you purchase a larger quantity of a certain food, it will be cheaper per serving. However, this is only a good idea if you will end up consuming it all and not have to throw it away due to it expiring.
Try not to spend a lot of extra money on versions of foods that may be marketed as better for you, just to go along with a higher price tag. Along with that, limit organic foods and produce, as the normal version of them are still really healthy, and much less expensive.
Don't forget to take advantage of sales and coupons too! A lot of times shopping at a few different places can make your grocery bill cheaper, although it does require an extra time commitment.