These three verses are a unit, addressed to the “sluggard” – a lazy guy and regular character in Proverbs. It may have been a well-known wise saying in Solomon’s time and not one of his specific father-to-son messages.
The lazy guy was told to go and watch the ant (only mentioned here and 30:25), a simple task for a guy with nothing else to do. He was also supposed to “consider its ways and be wise.” The end of this exercise was for him to gain some wisdom – begin seeing life from God’s point of view.
In case he didn’t know what to actually look for, it was noted that the ant has no recognizable boss – “no commander, overseer or ruler” – and yet stays busy, seemingly always knowing what to do next.
If he watches long enough, he will observe that the ant gathers food during “harvest” time (:8), when everyone does. But, if he keeps watching, he will also see that the ant also stores up provisions “in summer” (:8; also see 30:25), when there isn’t nearly as much to gather (see also 10:5).
If he continued to watch, he would also see that this ant will always have sufficient, even in winter when there’s even less to gather. So, if this little critter is smart enough and sufficiently capable to do all this, a grownup lazy guy should be able to do it, too!