Q:

How to programmatically provide site structure and url path to Google search

Searching Stackoverflow on Google I get this result:

Inspecting the HTML source of the Stack Overflow frontpage I can't find any reference of 
"A language-indipendent collaboratively edited question and answer site for programmers" stuff.
I thought it was something related to meta description, but it is not true.
Also, where are the Log In, Questions, Ask Question etc. declared? Sitemap.xml?
In few words, could I obtain the same result simply editing my web site content, or is it something configured on some Google webmaster panel?

A:

When the search engines try to determine which content they should use for the snippet showed in the search results, they take a look at two things:

Meta description tag
Content on the page

Because the goal of the search engines is to show a snippet that is as informative and useful for the searchers as possible, the  search engines will first evaluate the meta description tag trying to determine how relevant this description is to the keywords (search terms) used by the searcher in his query. A very straightforward indication of relevance is the presence of any of those keywords in the meta description tag. If the meta description is not present or it is determined to be irrelevant to the query performed, the search engines will try to pull content from the page and use it as the snippet for the search results. This behavior is true for several search engines such as Bing (and by extension for Yahoo!, whose search results are powered by Bing), Ask.com, etc.
Ok, let's now take a look at Google's search results for the query "stack overflow":

Stack Overflow
A language-independent collaboratively edited question and answer site for programmers.
stackoverflow.com

As we can see, the snippet includes the following text: "A language-independent collaboratively edited question and answer site for programmers." Surprisingly enough, this line of text doesn't appear in neither the meta description (which is actually missing from the page), nor in the content of Stack Overflow's homepage. Where did that line of text come from then?
Here's the answer: Google and AOL evaluate a third source of information to determine the search result snippet of a page: the DMOZ directory. DMOZ is an open content directory, which includes links to millions of websites, organized by category. Let's do a search for Stack Overflow on DMOZ:

Stack Overflow - A language-independent collaboratively edited question and answer site for programmers.

As we can see, Stack Overflow is listed on DMOZ and its description its being used by Google and AOL to populate the snippet.
If we try the same search for Yahoo! (or Bing), this is what we obtain:

Stack Overflow
Stack Overflow. Questions; Tags; Users; Badges; Unanswered. Ask Question. Top Questions active 171 featured hot week month

Because the meta description tag is missing from Stack Overflow's homepage, and because Yahoo! doesn't use the DMOZ directory as an extra source of information, the only thing that Yahoo! has left is to pull content from the page, with poor results.
Instead of blaming Yahoo!, however, it is Stack Overflow's fault not to have included a meta description tag on their homepage, which would allow them to have more control over what gets displayed in the search results. Remember that the snippet has a strong influence in the Click Through Rate (CTR), which is the percentage of searchers that clicked on Stack Overflow's link from the search results page. Common sense says that it's more likely for someone to click on a descriptive snippet than to click on a snippet that reads "Stack Overflow. Questions; Tags; Users; Badges; Unanswered. Ask Question. Top Questions active 171 featured hot week month".
Finally, regarding the sitelinks, and as David Dorward mentioned, those links are automatically generated by Google and the only control that the webmaster has over them is to decide whether he wants to block them or not. There are a few factors that Google considers when determining if your website deserves to receive sitelinks: link structure/site architecture of your site, number of inbound links to your landing pages, anchor text of those links, traffic coming from Google's search results directly to your landing pages, etc.

