Historically, it seems that lookit has appeared in print in three distinct contexts: as a variant spelling of looked; as a variant spelling of "look at,"
and as an idiomatic form of the imperative "Look!" I found some early occurrences of each.
'Lookit' as 'looked'
The earliest instances of lookit that a Google Books search finds are as variants for the past-tense verb looked. Many of these print instances arise in Scottish writing. For example, from a song titled "Bothwell," in Ancient and Modern Scottish Songs, Heroic Ballads, Etc. (published in Edinburgh in 1776):
He's blawn his horn sae sharp and shrill, / Up start the deer on every hill. / He's blawn his horn sae lang and loud, / Up start the deer int he gude green wood. / His Lady Mother lookit owre the castle wa'. / And she saw them riding ane and a'.
And from Robert Jamieson, Popular Ballads and Songs, From Tradition, Manuscripts, and Scarce Editions, volume 2 (published in Edinburgh in 1806) in three separate songs:
O whan the sun was now gane down / He's doen him till her bower; / And there, by the lee licht o'the moon, / Her window she lookit o'er. ["The Birth of Robin Hood"]
Whan Johnie lookit the letter on, / A hearty laugh leuch he; / But re he read it till an end, / The tear blinded his e'e. ["Bonny Baby Livingston"]
I soon gat anither [friend],—but ah, willawins! / I loutit to lean, and my staff was a strae! / To a fourth ane I grantit / The help that he wantit;— / But ne'er has he lookit my gate sin that day! ["Song XXI"]
In these instances—and in quite a few others that appear throughout the nineteenth century—lookit is simply a variant of looked, presumably spelled as it is to represent the pronunciation of the word in contemporaneous Scots English.
'Lookit' as 'look at'
Another form of usage involves lookit appearing in the sense of "look at." Again, as was the case in instances where lookit stood in for looked," there is no syntactical difference between lookit and "look at"; the point of the spelling lookit seems simply to imitate the pronunciation of "look at" that the quoted speaker uses. This form begins showing up in Google Books matches in the 1920s. In their answers to the "Information about 'lookit'" question, both Michael Harvey and user067531 cite Theodore Dreiser's use of lookit in this sense in An American Tragedy (1925):
Moved by this thought, she paused and exclaimed: "Oh, isn't that just the classiest, darlingest little coat you ever saw! Oh, do look at those sleeves, Doris." She clutched her companion violently by the arm. "Lookit the collar. And the lining. And those pockets! Oh, dear!"
However, an Elephind newspaper database search finds instances of lookit in the sense of "look at" from at least as early as 1901. From "A Police Station Story," in the Colfax [Louisiana] Chronicle (January 5, 1901), reprinted from the Chicago [Illinois] Daily Record:
"Are they [six roosters in a cage] quarreling?"
"Not thim! Shure, they're only sky larkin'."
"I'll lay two to one on the gray," yelled Riley, forgetting himself.
"I'll take it" shouted Dinny; "he can't stand the gaff!"
"Lookit the uppercut o' Gaffney's bird!" shrieked one of the boys down on his knees with excitement.
"This must stop at once!" commanded the lady; "those birds are fighting!"
And from "The Sketcher: A Later Waterloo," in the [Ipswich] Queensland Times, Ipswich Herald and General Advertiser (December 3, 1901):
At the instant little 'Gene exclaimed, "Oh, maw, lookit paw doin' th' Dutch roll!"
The policemen in this vignette are evidently Irish American.
And again (somewhat later) from Jim Manee, "It's a Great World After All Whether You're 'Going North, South or West'," in the [Chicago, Illinois] Day Book (June 15, 1915), an article about life aboard a jitney bus:
"Lookit the poor boob! Stalled right in the middle of the street. (Noise like a steam calliope): "Get out of the way. We got a full load at ten cents a head and can't can't afford to loiter. We're off folks. Don't get impatient."
And from the title of a comic strip by Satterfield in the Tacoma [Washington] Times (July 3, 1915):
Gee! Lookit the Fire Works in Europe
'Lookit' as 'Look!'
Something fundamentally different in terms of syntax seems to be going on in Frank Clifford, A Romance of Perfume Lands, Search for Capt. Jacob Cole (Boston, 1875):
But what was the matter with Patsey? While we were busily taking, he has been looking around, and is now trying to attract our attention, and grinning from ear to ear. Coming to where we were, he said:—
"Shure sir, here comes a whole rigiment here comes a whole rigiment of lame an' blind; shure lookit, they'er thryin' to loight the way wid candles, an' the sun out as bright as Miss Susie's eyes."
Patsey is a 25-year-old Irish immigrant to the United States who has inadvertently joined an expedition to the Far East by stowing away on a ship in hopes of returning to Ireland. He uses lookit not as a variant form of looked or "look at" but in the imperative sense of "look at it!" or simply "look!"
The association of the expression with an Irish speaker isn't exclusive to Frank Clifford. From Foster Osborne, Cowabee, serialized in the [Sydney, New South Wales] Australian Town and Country Journal (May 13, 1882):
" Mother-o-Moses, but it's a dark dade ye'll be after doin', Misther Loyd, when Rory Rooney begrudges ye a bite. There's a swate sup o' tay in the pot, and a damper on the binch, that'll make your mouth wather. Lookit, it's meself'll hould the horses whilst ye does be ateing yourself. Murder, bad cess to your growlin'; Cazur come into my fut, or may be it's yer ribs I'll be smashin' Glory be to God."
From an untitled brief item in the [Brisbane] Queensland Figaro and Punch (January 30, 1886):
Sergeant of police, Brisbane, to constable: "Lookit, yere always under a verandah, barrin' whin I'm around. Whoi don't ye walk yere beat?"
Constable: "Don't I, thin ; what d'ye mean?"
Sergeant: "I niver see ye, barrin' whin I'm on the beat meself."
Constable: "Well, how could ye, if ye don't come?"
Sergeant: "Och, oi don't know, but keep yer oi open."
From "A New Experience," in the Albion [Illinois] Journal (August 23, 1888):
Mistress (pumping)—Hold the pitcher under the spout, Bridget!
Biddy O'Galway (under training)—Oh, mother uv Moses! Lookit! Sich a t'ing! All yez have to do is to to be shakin' that stick, an' yez get hould o' one ind o' the wather, an' jist pull out a rope of it. Sich a t'ing. Sure, ma'am, the only kind of pump we have in Ireland is a bucket.
The earliest non-Irish instance of lookit as a standalone imperative that I've been able to find is from Norman Duncan, "The Chase of the Tide," in the St. Paul [Minnesota] Globe (June 26, 1904):
"Lookit!" Ezekiel exclaimed, pointing to the shore. He was scared to a whisper.
"'Tis Bob," Jo said. "Hark!"
Bob, a frowsy old dog with the name of a fish-thief, was in the shadow of a flake, howling and madly pawing the shingle.
Jo is a ten-year-old Newfoundland boy, and Ezekiel is his somewhat younger friend. Neither is identified in any way as being of Irish heritage, and both speak a dialect that is evidently peculiar to native Newfoundlanders.
And from Zona Gale, "Daffodils," in the Salt Lake [City] Tribune (March 24, 1907):
"Lookit! Lookit! Now they know it's spring!" went Paul excitedly. But I glanced at the schoolmaster's wife, and I watched her as she first saw what was happening; and then my heart leaped up in a fashion most absurd for a man of seventy, whose heart is supposed to be old and disinterested.
Paul is a seven-year-old boy from a well-to-do family who is visiting New York City with his grandfather from somewhere a fairly short train ride away.
By the 1920s, however, neither the Irish connection nor the link to children is prevalent in Google Books matches for lookit in the sense of "Look!" From Caroline Franklin, "A Dark Laid Plot," in Overland Monthly and the Out West Magazine (1924):
Lan' sake, how mah h'aht do pound'!" moaned Malviny. "Lookit—dat dar Alkali Jones whut done bus' off wid me!" See him er-standin' dar, des dat gran' wid his white undahtakah's gloves, an' his bes' man.
Lisen, Sis' Jenkins, de weddin' mahch! An' lookit—lookit—Heah dey comes!"
From Cyril Hume, The Golden Dancer (1926) (three of fourteen instances in the book):
The Traveler sat up straight and leaned toward her. "Well now, lookit, girlie. ... Suppose I was to get that job. You could walk into that ole store and just ask for any kind of stuff at all without paying a nickel."
"I don't say I ain't," the little man parried.
"Well then, lookit." Wells began. "Lookit here now, Mr. . . ."
"“Name of Klügel," said the little man.
"Not ezackly a job," Wells amended with fine diplomacy. "It'll be more like sumpm to do. Fun it'll be. ... Lookit, Link. I figure you're just about the hardest bozo in this burg. I mean you could easy hang one on pretty near everybody that might come around gettin' wise."
And from an unidentified short story in O. Henry Memorial Award Prize Stories (1926):
"...Papa, I want you to know I'm glad this woman came into your life."
"Now, lookit, Pauline," he protested, "she didn't! You mustn't say such things! I won't——"
But there he was interrupted by the sound of steps and voices on the porch, and the ringing of the doorbell.
'Lookit here' as a possible source of the standalone imperative 'Lookit!'
The 1926 instance of "lookit here" prompted me to check into the possibility that Lookit" in the sense of "Look!" might have originated as a shortened form of the longer phrase "lookit here." The earliest instance of lookit here that an Elephind search finds is rendered in a quasi-African American dialect. From Fannie Bolton, "Tend Your Own Patch," in the [Minnesota] Mower County Transcript (April 9, 1884):
Don't bodder poor Jones wid yer judgment and sneer, / Dere's more real good moral in lub an' in work / Dan in hours of preachin', for now lookit here, / Ain't a good workin' man a rebuke to a shirk?
It turns up again in "Beginning a Long Fast," in the [New York] Evening World (February 25, 1889):
"You don't? Why don't you?" asked the reporter.
"Because I am Van Dusan, and intend to do just what I say. Now, lookit here."
But the reporter fled, and never said another word until he found George Peck, who had been pointed out to him as one of the proprietors.
From "Not His Fault," in the [Leadville, Colorado] Herald Democrat (April 22, 1894), an anecdote involving "Jimmy Knockerout, de pugilist":
Why didn't you say so before, you young fool?"
"'Cause you waz so sassy 'bout de tin—dat's why. See? Nottin ter me wedder yer give der mershine a knockout or not. An lookit here, if yer call me dat agin, I'll t'ump yer one in de neck.
And from "Stray Bubbles," in the [Echuca, Victoria] Riverine Herald (August 29, 1892):
The drift of a rather amusing conversation reached me one ovening recently, and it had reference to matters municipal. Two rate-payers were discussing the municipal situation, and one of them was heard to say, "Lookit 'ere, me bhoy; the divil a care what me principles are or what ould Mac. or the draper is loike, but I'm goin' to vote for the man what's agin——." The name appears in blank verse for obvious reasons.
It seems possible that the expression "lookit here" may be a variant of "looky here" or "look-a-here," both of which seem to be older than "lookit here" and may be contracted forms of "look ye [or you] here." An anecdote in the Holly Springs [Mississippi] Gazette (August 5, 1842) has a (presumably white) woman who runs an inn in the Sandy River region of Virginia say this:
"Looky here men; ain't you a d—d nice set to let a preacher come here and catch you a pla'in cards?"
And Harry Halyard, The Heroine of Paris, Or, The Novice of Notre Dame (1848) has an American character use the phrase "look a here":
'Look a here, 'Squire,' said Jotham, 'dew yew belong tew the Temperance Society?'
The earliest print matches for lookit that I found were instances where the word was used as a variant for looked in Scots English dialect. I found Google Books matches going back to 1776, but a match that a search on Early English Books Online found suggests that the form is much older than that. From the 1571 George Buchanan translation out of the Latin of Ane detectioun of the duinges of Marie Quene of Scottes thouchand the murder of hir husband, and hir conspiracie, adulterie, and pretensed mariage with the Erle Bothwell. And ane defence of the trew Lordis, mainteineris of the Kingis graces actioun and authoritie.:
Perhappes you meant to send out some to receiue thaim that fled[,] but you saw no man flee. And therefore the lightes that were seene out of the hyest part of your house all the night long, were, as vpon the lucky ending of the thing that you lookit for, euen then sodenly put out.
The earliest matches I could find for lookit in the sense of "look at" were from 1901—one in Illinois in January of that year and one in Queensland in December. In both of those cases, and indeed generally, the spelling seems to have been chosen to indicate the speaker's pronunciation of "look at," not to introduce a word with a different syntactical function from the phrase "look at."
Instances of lookit used in the sense of the imperative "Look!" go back to 1875 in the sources I checked. The earliest four matches (from 1875, 1882, 1886, and 1888) all involve Irish speakers, strongly indicating that some writers in the period 1875–1888 viewed the form as a peculiarity of Irish English dialect. In 1904 and 1907 writers put the expression in the mouths of non-Irish children—one from a Newfoundland village and one from an affluent town in the northeastern United States. By the 1920s, writers were freely attributing the expression to non-Irish adults.
I tried to investigate the possibility that lookit in the sense of "Look!" arose from the longer phrase "lookit here," which may in turn have arisen from a cluster of variants including "looky here" and "look-a-here." Unfortunately, I didn't find anything conclusive. The earliest match for "lookit here" that I could find was from 1884, nine years after the earliest instance of lookit in the sense of "Look!"; on the other hand, instances of "looky here" (1842) and "look a here" (1848) are considerably older than that 1875 instance of lookit.
I suspect that "looky here" and "look-a-here" are in large part responsible for the emergence of the expression "lookit here" by 1894. Nevertheless, the concentrated attribution of the earliest matches of standalone "lookit" in the sense of "Look!" to Irish speakers suggests to me that it was originally understood to be an Irish form, independent of "looky here" and "look-a-here." Intensive research into Irish publications from the period 1840–1880 might corroborate or seriously weaken this hypothesis.